package ModelLayer;


/**
 * Write a description of class Loan here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Loan
{
    // instance variables - replace the example below with your own
    private int id;
    private String borrowDate;
    private String period;
    private Boolean state;
    private Person person;
    private Copy copy;

    /**
     * Constructor for objects of class Loan
     */
    public Loan()
    {
        this.id=0;
        this.borrowDate=" ";
        this.period=" ";
        this.state=true;
       
    }

    public void updatePerson(Person person)
    {
        this.person=person;
    }
    
    public void updateCopy(Copy copy)
    {
        this.copy=copy;
    }
    
    public Copy readCopy()
    {
        return copy;
    }
    
    public Person readPerson()
    {
        return person;
    }
    
   public void createLoan(int id, String borroDate, String period)
   {
       this.id=id;
       this.borrowDate=borroDate;
       this.period=period;
       this.state=true;
           
   }
   
   public int readID()
   {
       return id;
   }
   
   public void updateID(int id)
   {
       this.id=id;
   }
   
   public String readBorrowDate()
   {
       return borrowDate;
   }
   
   public void updateBorrowDate(String borrowDate)
   {
       this.borrowDate=borrowDate;
   }
   
   public String readPeriod()
   {
       return period;
   }
   
   public void updatePeriod(String period)
   {
       this.period=period;
   }
   
   public Boolean readState()
   {
       return state;
   }
   
   public void updateState(Boolean state)
   {
       this.state=state;    
   }
}
